package com.jz.community.modulemine.money.net;

import com.jz.community.basecomm.bean.BaseResponseInfo;
import com.jz.community.basecomm.constant.Constant;
import com.jz.community.modulemine.money.bean.MoneyActiveBean;
import com.jz.community.modulemine.money.bean.MoneyDetailBean;
import com.jz.community.modulemine.money.bean.MoneyExchangeCodeBean;
import com.jz.community.modulemine.money.bean.MoneyInfoBean;
import com.jz.community.modulemine.money.bean.MoneyRechargeBean;
import com.jz.community.modulemine.money.bean.PurchaseInfoBean;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

public interface MoneyNetApi {

    @GET(Constant.MONEY_INFO)
    Observable<MoneyInfoBean> initMoneyData();

    @GET(Constant.MONEY_DETAIL)
    Observable<MoneyDetailBean> initMoneyDetailData(@Query("page") int page, @Query("size") int size);

    @GET(Constant.MONEY_RECHARGE_ACTIVE)
    Observable<MoneyActiveBean> initMoneyActive();

    @POST(Constant.MONEY_RECHARGE)
    Observable<MoneyRechargeBean> rechargeMoney(@Query("type") String type, @Query("amount") double money);

    @GET(Constant.MONEY_EXGHANGE_CODE)
    Observable<MoneyExchangeCodeBean> initCodeInfo(@Query("code") String code);

    @POST(Constant.MONEY_EXGHANGE)
    Observable<BaseResponseInfo> exchangeMoney(@Query("code") String code);

    @GET(Constant.MONEY_PURCHASE_INFO)
    Observable<PurchaseInfoBean> initPurchaseInfo();

    @POST(Constant.PURCHASE_MONEY)
    Observable<PurchaseInfoBean> purchaseMoney(@Body RequestBody body);
}
